package com.tiantianfresh.model.pojo;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.List;

/**
 * @author FANGAO
 * @date 2021/11/14 - 下午 22:57
 */
@Data
@Table(name = "t_permission")
public class Permission {
    @Id
    private Integer id;
    /**
     * 节点名
     */
    private String name;
    private String url;
    private Integer pid;
    /**
     * 刷新时是否打开此节点的子节点
     */
    private boolean open = true;
    /**
     * 选择框，当值为true时为选择项 否则取反
     */
    private boolean checked = false;
    private String icon;
    /**
     * 子节点存储
     * children: [
     *		{ name:"叶子节点111"},
     *		{ name:"叶子节点112"},
     *		{ name:"叶子节点113"},
     *		{ name:"叶子节点114"}
     *	]}
     */
    private List<Permission> children = new ArrayList<Permission>();
}
